// 导入请求实例/Role
import request from '@/utils/request'

// 查部门列表
export const getRoleListData = params => {
  return request({
    url: '/sys/role',
    method: 'GET',
    params
  })
}

// 查部门信息
export const getRoleInfoData = id => {
  return request({
    url: '/sys/role/' + id,
    method: 'GET'
  })
}

// 增加部门信息
export const addRoleData = data => {
  return request({
    url: '/sys/role/',
    method: 'POST',
    data
  })
}

// 修改部门信息
export const editRoleData = data => {
  return request({
    url: '/sys/role/' + data.id,
    method: 'PUT',
    data
  })
}

// 删除部门信息
export const delRoleData = id => {
  return request({
    url: '/sys/role/' + id,
    method: 'DELETE'
  })
}

// 获取公司信息
export const getCompanyInfo = id => {
  return request({
    url: '/company/' + id,
    method: 'GET'
  })
}

